/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.minierp.bean.DeliverBillBean;
import com.minierp.bean.DeliverBillItemBean;
import com.minierp.bean.OrderParameterCarrier;
import com.minierp.bean.QueryParameterBean;
import com.minierp.bean.QueryResult;
import com.minierp.bean.UserBean;
import com.minierp.bean.UserStatus;
import com.minierp.dao.BusinessBillDao;
import com.minierp.dao.BusinessBillItemDao;
import com.minierp.dao.CodeRuleDao;
import com.minierp.dao.DeliverBillDao;
import com.minierp.dao.DeliverBillItemDao;
import com.minierp.dao.DepartmentDao;
import com.minierp.dao.EstablishmentContactDao;
import com.minierp.dao.IdGenerator;
import com.minierp.dao.MakeTypeDao;
import com.minierp.dao.PayModeDao;
import com.minierp.dao.QueryDao;
import com.minierp.dao.SerialNumberDao;
import com.minierp.dao.SmsAlertDao;
import com.minierp.dao.TallySetDao;
import com.minierp.dao.UnitDao;
import com.minierp.err.NotAllowException;
import com.minierp.err.PermissionDennyException;
import com.minierp.helper.EncCommonHelper;
import com.minierp.helper.EncDeliverBillMACtrHelper;
import com.minierp.helper.EncInterceptorHelper;
import com.minierp.helper.PageHelper;
import com.minierp.model.BusinessBill;
import com.minierp.model.BusinessBillExt;
import com.minierp.model.BusinessBillItem;
import com.minierp.model.CodeRule;
import com.minierp.model.DeliverBill;
import com.minierp.model.DeliverBillItem;
import com.minierp.model.Department;
import com.minierp.model.EnterpriseInfo;
import com.minierp.model.Establishment;
import com.minierp.model.EstablishmentContact;
import com.minierp.model.MakeType;
import com.minierp.model.SmsAlert;
import com.minierp.model.TallySet;
import com.minierp.service.DeliverBillService;
import com.minierp.view.DeliverBillItemListExcelView;
import com.minierp.view.DeliverBillListExcelView;
import com.minierp.view.DeliverBillListForAccountExcelView;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import org.springframework.dao.CannotAcquireLockException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class DeliverBillMACtr extends MultiActionController {
	private String dialogSuccessView;
	private String listForExamineView;
	private String infoForExamineView;
	private String listForUnExamineView;
	private String infoForUnExamineView;
	private String listForCancelView;
	private String infoForCancelView;
	private String searchResultView;
	private String itemListForBusinessBillView;
	private String printView;
	private String printCostView;
	private String downloadView;
	private String printMultiCostView;
	private String printMultiView;
	private String listForAccountFormView;
	private String listForAccountView;
	private String setDeliCodeFormView;
	private String itemSearchResultView;
	private BusinessBillDao businessBillDao;
	private BusinessBillItemDao businessBillItemDao;
	private DeliverBillDao deliverBillDao;
	private DeliverBillItemDao deliverBillItemDao;
	private DepartmentDao departmentDao;
	private MakeTypeDao makeTypeDao;
	private PayModeDao payModeDao;
	private TallySetDao tallySetDao;
	private EstablishmentContactDao establishmentContactDao;
	private SmsAlertDao smsAlertDao;
	private QueryDao queryDao;
	private CodeRuleDao codeRuleDao;
	private SerialNumberDao serialNumberDao;
	private IdGenerator idGenerator;
	private DeliverBillService deliverBillService;
	private UnitDao unitDao;
	private DataSource dataSource;

	public BusinessBillDao getBusinessBillDao() {
		return this.businessBillDao;
	}

	public void setBusinessBillDao(BusinessBillDao businessBillDao) {
		this.businessBillDao = businessBillDao;
	}

	public SmsAlertDao getSmsAlertDao() {
		return this.smsAlertDao;
	}

	public void setSmsAlertDao(SmsAlertDao smsAlertDao) {
		this.smsAlertDao = smsAlertDao;
	}

	public String getItemSearchResultView() {
		return this.itemSearchResultView;
	}

	public void setItemSearchResultView(String itemSearchResultView) {
		this.itemSearchResultView = itemSearchResultView;
	}

	public String getSetDeliCodeFormView() {
		return this.setDeliCodeFormView;
	}

	public void setSetDeliCodeFormView(String setDeliCodeFormView) {
		this.setDeliCodeFormView = setDeliCodeFormView;
	}

	public PayModeDao getPayModeDao() {
		return this.payModeDao;
	}

	public void setPayModeDao(PayModeDao payModeDao) {
		this.payModeDao = payModeDao;
	}

	public EstablishmentContactDao getEstablishmentContactDao() {
		return this.establishmentContactDao;
	}

	public void setEstablishmentContactDao(
			EstablishmentContactDao establishmentContactDao) {
		this.establishmentContactDao = establishmentContactDao;
	}

	public String getListForAccountFormView() {
		return this.listForAccountFormView;
	}

	public void setListForAccountFormView(String listForAccountFormView) {
		this.listForAccountFormView = listForAccountFormView;
	}

	public String getListForAccountView() {
		return this.listForAccountView;
	}

	public void setListForAccountView(String listForAccountView) {
		this.listForAccountView = listForAccountView;
	}

	public ModelAndView handleSearchResult(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_BILL_SEAR")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			String contentType = request.getParameter("content_type");
			QueryParameterBean b = EncDeliverBillMACtrHelper
					.handleSearchResultCost(request, this.dataSource);
			QueryResult qr = this.queryDao.doQuery(b.getQParas(),
					(OrderParameterCarrier[]) null, (String[]) null,
					b.getShortNameMap(), b.getRetObjs(), (String[]) null);
			List list = qr.getList();
			String costTotal = "0";
			if (!list.isEmpty() && list.get(0) != null) {
				costTotal = ((BigDecimal) list.get(0)).setScale(2, 4)
						.toString();
			}

			b = EncDeliverBillMACtrHelper.handleSearchResult(request,
					this.dataSource);
			if (contentType != null && contentType.equals("EXCEL")) {
				qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
						(String[]) null, b.getShortNameMap(), b.getRetObjs(),
						(String[]) null);
				HashMap mv1 = new HashMap();
				mv1.put("list", qr.getList());
				mv1.put("costTotal", costTotal);
				DeliverBillListExcelView ub1 = new DeliverBillListExcelView();
				return new ModelAndView(ub1, mv1);
			} else {
				qr = this.queryDao.doQuery(b.getCurrentPage(), b.getPageSize(),
						b.getQParas(), b.getOParas(), (String[]) null,
						b.getShortNameMap(), b.getRetObjs(), (String[]) null);
				ModelAndView mv = new ModelAndView(this.searchResultView);
				mv.addObject("qr", qr);
				mv.addAllObjects(b.getParameters());
				mv.addObject("departmentList", this.departmentDao.getList(true));
				UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, ub));
				mv.addObject("costTotal", costTotal);
				return mv;
			}
		}
	}

	public ModelAndView handleExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		EnterpriseInfo ent = EncCommonHelper.getEnterpriseInfo(request);
		String idStr = request.getParameter("id_str");
		String flag = request.getParameter("flag");
		boolean examined = false;
		if (flag != null && flag.equals("1")) {
			examined = true;
		}

		String[] arr = idStr.split(";");
		boolean num = false;
		String msg;
		int w;
		byte arg16;
		if (!examined) {
			if (!EncCommonHelper.checkPrivilege(request, "DELI_UN_EXAM")) {
				throw new Exception("Permission deny!");
			}

			try {
				for (w = 0; w < arr.length; ++w) {
					this.deliverBillService.txUnExamine(Long.parseLong(arr[w]),
							ent.getDeliAutoComp(), ub, this.deliverBillDao,
							this.deliverBillItemDao, this.businessBillItemDao);
				}

				msg = "反审核成功";
			} catch (NotAllowException arg14) {
				msg = arg14.getMessage();
			} catch (CannotAcquireLockException arg15) {
				msg = "事务冲突故障，请重新操作！";
			}

			arg16 = 1;
		} else {
			if (!EncCommonHelper.checkPrivilege(request, "DELI_EXAM")) {
				throw new Exception("Permission deny!");
			}

			try {
				for (w = 0; w < arr.length; ++w) {
					this.deliverBillService.txExamine(Long.parseLong(arr[w]),
							ent.getDeliAutoComp(), ub, this.deliverBillDao,
							this.deliverBillItemDao, this.businessBillItemDao);
				}

				msg = "审核成功";
			} catch (NotAllowException arg12) {
				msg = arg12.getMessage();
			} catch (CannotAcquireLockException arg13) {
				msg = "事务冲突故障，请重新操作！";
			}

			arg16 = 1;
		}

		mv.addObject("returnValue", String.valueOf(arg16));
		EncCommonHelper.setAlertMessage(request, msg);
		return mv;
	}

	public ModelAndView handleListForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.deliverBillDao.getListCount(searchKey, false,
					Long.parseLong(tsId), managerId, ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.deliverBillDao.getList(searchKey, false,
					Long.parseLong(tsId), managerId, ub, allowStart,
					"DELIVER_DATE", startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForExamineView);
		String id = request.getParameter("id");
		this.getDeliverBill(mv, Long.parseLong(id), false);
		return mv;
	}

	public ModelAndView handleListForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_UN_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForUnExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.deliverBillDao.getListCount(searchKey, true,
					Long.parseLong(tsId), managerId, ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.deliverBillDao.getList(searchKey, true,
					Long.parseLong(tsId), managerId, ub, allowStart, "ID_DESC",
					startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForUnExamineView);
		String id = request.getParameter("id");
		this.getDeliverBill(mv, Long.parseLong(id), false);
		return mv;
	}

	public ModelAndView handleListForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_CANC")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForCancelView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.deliverBillDao.getListCount(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.deliverBillDao.getList(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart, "",
					startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForCancelView);
		String id = request.getParameter("id");
		this.getDeliverBill(mv, Long.parseLong(id), false);
		return mv;
	}

	public ModelAndView handleCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		EnterpriseInfo ent = EncCommonHelper.getEnterpriseInfo(request);
		if (!EncCommonHelper.checkPrivilege(request, "DELI_CANC")) {
			throw new Exception("Permission deny!");
		} else {
			String id = request.getParameter("id");
			String reason = request.getParameter("reason");
			String msg = "作废成功";

			try {
				this.deliverBillService.txCancel(Long.parseLong(id), reason,
						ent.getDeliAutoComp(), ub, this.deliverBillDao,
						this.deliverBillItemDao, this.businessBillItemDao,
						this.idGenerator);
			} catch (NotAllowException arg9) {
				msg = arg9.getMessage();
			} catch (CannotAcquireLockException arg10) {
				msg = "事务冲突故障，请重新操作！";
			}

			mv.addObject("returnValue", id);
			EncCommonHelper.setAlertMessage(request, msg);
			return mv;
		}
	}

	private void getDeliverBill(ModelAndView mv, long id, boolean countCost)
			throws Exception {
		DeliverBill deliverBill = (DeliverBill) this.deliverBillDao.get(
				DeliverBill.class, id);
		DeliverBillBean form = new DeliverBillBean();
		if (deliverBill != null && !deliverBill.getEnabled().equals("N")) {
			BusinessBill businessBill = (BusinessBill) this.deliverBillDao.get(
					BusinessBill.class, deliverBill.getBusinessBillId());
			BusinessBillExt bbe = (BusinessBillExt) this.deliverBillDao.get(
					BusinessBillExt.class, deliverBill.getBusinessBillId());
			if (businessBill == null) {
				throw new Exception("Business bill not found for id:"
						+ deliverBill.getBusinessBillId());
			} else {
				form.setDeliverBill(deliverBill);
				List itemList = this.deliverBillItemDao
						.getListByDeliverBill(deliverBill.getId());
				Establishment est = (Establishment) this.deliverBillDao.get(
						Establishment.class, businessBill.getClientId());
				if (est != null) {
					form.setClientName(est.getEstName());
					form.setClientCode(est.getEstCode());
				}

				TallySet ts = (TallySet) this.deliverBillDao.get(
						TallySet.class, deliverBill.getTallySetId());
				if (ts != null) {
					form.setTallySetName(ts.getTitle());
				}

				if (businessBill.getDepartmentId() != 0L) {
					Department arr = (Department) this.deliverBillDao.get(
							Department.class, businessBill.getDepartmentId());
					if (arr != null) {
						form.setDepartmentName(arr.getDepartmentName());
					}
				}

				form.setContractCode(businessBill.getContractCode());
				form.setBbCode(businessBill.getBillCode());
				form.setBbDate(businessBill.getOrderDate());
				form.setManagerName(businessBill.getManagerName());
				form.setFavCost(businessBill.getFavCost());
				form.setBbCost(businessBill.getCost());
				form.setRemaCost(businessBill.getCost()
						.add(bbe.getAdjustCost())
						.subtract(bbe.getCollectedCost()));
				ArrayList arg22 = new ArrayList();
				List bbItemList = this.businessBillItemDao.getList(businessBill
						.getId());
				List makeTypeList = this.makeTypeDao.getList(false);
				BigDecimal costTotal = new BigDecimal(0);

				for (int i = 0; i < itemList.size(); ++i) {
					DeliverBillItemBean itemBean = new DeliverBillItemBean();
					DeliverBillItem item = (DeliverBillItem) itemList.get(i);
					itemBean.setDeliverBillItem(item);

					for (int j = 0; j < bbItemList.size(); ++j) {
						BusinessBillItem bbItem = (BusinessBillItem) bbItemList
								.get(j);
						if (bbItem.getId() == item.getBbItemId()) {
							itemBean.setMakeTypeName(EncCommonHelper
									.getSimpleObjectName(makeTypeList,
											bbItem.getMakeTypeId()));
							itemBean.setProductName(bbItem.getProName());
							itemBean.setSpecification(bbItem.getSpecification());
							itemBean.setFinishedContent(bbItem
									.getFinishedContent());
							itemBean.setMakeRequire(bbItem.getMakeRequire());
							itemBean.setAmountTotal(bbItem.getAmount());
							itemBean.setPriceType(bbItem.getPriceType());
							if (countCost) {
								itemBean.setUnitPrice(bbItem.getUnitPrice());
								BigDecimal amount = new BigDecimal(0);
								new BigDecimal(0);
								if (bbItem.getPriceType().equals("AMOUNT")) {
									itemBean.setUnit(bbItem.getUnit());
									amount = item.getAmount();
								} else if (bbItem.getPriceType().equals("AREA")) {
									itemBean.setUnit("平方米");
									amount = item.getAmount()
											.multiply(bbItem.getSquareNum())
											.divide(bbItem.getAmount(), 4, 4);
								} else if (bbItem.getPriceType().equals(
										"LENGTH")) {
									if (bbItem.getLengType().equals("M")) {
										itemBean.setUnit("米");
									} else {
										itemBean.setUnit("公分");
									}

									amount = item.getAmount()
											.multiply(bbItem.getSquareNum())
											.divide(bbItem.getAmount(), 4, 4);
								}

								BigDecimal itemCost = amount.multiply(
										bbItem.getUnitPrice()).setScale(2, 4);
								costTotal = costTotal.add(itemCost);
								itemBean.setAmountStr(EncCommonHelper
										.parseBigDecimal(amount));
								itemBean.setCost(itemCost);
							} else if (bbItem.getPriceType().equals("AMOUNT")) {
								itemBean.setUnit(bbItem.getUnit());
							} else if (bbItem.getPriceType().equals("AREA")) {
								itemBean.setUnit(this.getUnit(makeTypeList,
										bbItem.getMakeTypeId()));
							} else if (bbItem.getPriceType().equals("LENGTH")) {
								itemBean.setUnit(this.getUnit(makeTypeList,
										bbItem.getMakeTypeId()));
							}
							break;
						}
					}

					arg22.add(itemBean);
				}

				form.setCost(costTotal.setScale(2, 4));
				form.setItems(arg22);
				mv.addObject("record", form);
				mv.addObject("est", est);
				mv.addObject("payModeList", this.payModeDao.getList(false));
			}
		} else {
			throw new Exception("Record not found or enabled for id:" + id);
		}
	}

	private String getUnit(List<?> makeTypeList, long makeTypeId) {
		String unit = "";
		if (makeTypeId != 0L) {
			for (int j = 0; j < makeTypeList.size(); ++j) {
				MakeType p = (MakeType) makeTypeList.get(j);
				if (p.getId() == makeTypeId) {
					unit = p.getUnit();
					break;
				}
			}
		}

		return unit;
	}

	public ModelAndView handleItemListForBusinessBill(
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ModelAndView mv = new ModelAndView(this.itemListForBusinessBillView);
		String id = request.getParameter("id");
		List items = this.deliverBillItemDao.getListByBusinessBill(Long
				.parseLong(id));
		List makeTypeList = this.makeTypeDao.getList(false);

		for (int i = 0; i < items.size(); ++i) {
			Object[] objs = (Object[]) items.get(i);
			DeliverBillItemBean itemBean = new DeliverBillItemBean();
			DeliverBillItem item = (DeliverBillItem) objs[1];
			BusinessBillItem bbItem = (BusinessBillItem) objs[2];
			itemBean.setDeliverBillItem(item);
			itemBean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, bbItem.getMakeTypeId()));
			itemBean.setProductName(bbItem.getProName());
			itemBean.setSpecification(bbItem.getSpecification());
			itemBean.setFinishedContent(bbItem.getFinishedContent());
			itemBean.setMakeRequire(bbItem.getMakeRequire());
			itemBean.setAmountTotal(bbItem.getAmount());
			objs[1] = itemBean;
		}

		mv.addObject("items", items);
		return mv;
	}

	public ModelAndView handlePrint(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String contentType = request.getParameter("content_type");
		String id = request.getParameter("id");
		ModelAndView mv;
		if (contentType != null && contentType.equals("EXCEL")) {
			mv = new ModelAndView(this.downloadView);
			this.getDeliverBill(mv, Long.parseLong(id), false);
		} else {
			String printCost = request.getParameter("print_cost");
			if (printCost != null && printCost.equals("1")) {
				mv = new ModelAndView(this.printCostView);
				this.getDeliverBill(mv, Long.parseLong(id), true);
			} else {
				mv = new ModelAndView(this.printView);
				this.getDeliverBill(mv, Long.parseLong(id), false);
			}

			mv.addObject("codeRule", this.codeRuleDao.get("DELIVER_BILL"));
		}

		return mv;
	}

	public ModelAndView handlePrintMulti(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String printCost = request.getParameter("print_cost");
		String id = request.getParameter("id");
		String[] idArr = id.split(";");
		List list = this.deliverBillItemDao.getListForPrintMulti(idArr);
		List mtList = this.makeTypeDao.getList(false);
		ArrayList arr = new ArrayList();
		long prevEstId = 0L;
		BigDecimal costTotal = new BigDecimal(0);
		Object[] tmpObjs = (Object[]) null;

		for (int i = 0; i < list.size(); ++i) {
			Object[] objs = (Object[]) list.get(i);
			String linkman = (String) objs[0];
			String phone = (String) objs[1];
			String address = (String) objs[2];
			String createrName = (String) objs[3];
			long estId = Long.parseLong(objs[18].toString());
			String estName = (String) objs[19];
			String ppPhone = (String) objs[20];
			Date deliverDate = (Date) objs[21];
			boolean estChange = false;
			if (prevEstId == 0L || prevEstId != estId) {
				prevEstId = estId;
				costTotal = new BigDecimal(0);
				tmpObjs = new Object[]{new ArrayList(), costTotal, estName,
						ppPhone, linkman, phone, deliverDate, address,
						createrName};
				estChange = true;
			}

			if (objs[4] == null) {
				objs[4] = "";
				objs[8] = Integer.valueOf(0);
				objs[9] = Integer.valueOf(0);
				objs[10] = Integer.valueOf(0);
			} else {
				long mtId = Long.parseLong(objs[4].toString());
				BigDecimal amountTotal = (BigDecimal) objs[8];
				BigDecimal thisAmount = (BigDecimal) objs[9];
				BigDecimal unitPrice = (BigDecimal) objs[10];
				String unit = (String) objs[13];
				BigDecimal squareNum = (BigDecimal) objs[14];
				String priceType = (String) objs[15];
				String lengType = (String) objs[17];
				objs[4] = EncCommonHelper.getSimpleObjectName(mtList, mtId);
				if (printCost != null && printCost.equals("1")) {
					BigDecimal amount = new BigDecimal(0);
					new BigDecimal(0);
					if (priceType.equals("AMOUNT")) {
						amount = thisAmount;
					} else if (priceType.equals("AREA")) {
						unit = "平方米";
						amount = thisAmount.multiply(squareNum).divide(
								amountTotal, 4, 4);
					} else if (priceType.equals("LENGTH")) {
						if (lengType.equals("M")) {
							unit = "米";
						} else {
							unit = "公分";
						}

						amount = thisAmount.multiply(squareNum).divide(
								amountTotal, 4, 4);
					}

					BigDecimal itemCost = amount.multiply(unitPrice).setScale(
							2, 4);
					costTotal = costTotal.add(itemCost);
					objs[11] = amount;
					objs[12] = itemCost;
				} else if (priceType.equals("AREA")
						|| priceType.equals("LENGTH")) {
					unit = this.getUnit(mtList, mtId);
				}

				objs[13] = unit;
			}

			((List) tmpObjs[0]).add(objs);
			tmpObjs[1] = costTotal;
			if (estChange) {
				arr.add(tmpObjs);
			}
		}

		ModelAndView mv;
		if (printCost != null && printCost.equals("1")) {
			mv = new ModelAndView(this.printMultiCostView);
		} else {
			mv = new ModelAndView(this.printMultiView);
		}

		mv.addObject("list", arr);
		mv.addObject("codeRule", this.codeRuleDao.get("DELIVER_BILL"));
		return mv;
	}

	public ModelAndView handleBatchNew(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		EnterpriseInfo ent = EncCommonHelper.getEnterpriseInfo(request);
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			CodeRule mapper = this.codeRuleDao.get("DELIVER_BILL");
			json = request.getParameter("bus_id_str");
			String[] out = json.split(";");

			try {
				Map w = this.deliverBillService.txInsertBatch(out,
						ent.getDeliAutoComp(), ub, mapper, this.deliverBillDao,
						this.deliverBillItemDao, this.businessBillItemDao,
						this.serialNumberDao, this.idGenerator);
				map.putAll(w);
				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (NotAllowException arg9) {
				map.put("status", "ERROR");
				map.put("errMsg", arg9.getMessage());
			} catch (CannotAcquireLockException arg10) {
				map.put("status", "ERROR");
				map.put("errMsg", "事务冲突故障，请重新操作！");
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		json = mapper1.writeValueAsString(map);
		ServletOutputStream out1 = response.getOutputStream();
		out1.write(json.getBytes("utf-8"));
		out1.flush();
		out1.close();
		return null;
	}

	public ModelAndView handleListForAccountForm(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_ACCO")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			Date now = new Date();
			SimpleDateFormat dateSf = new SimpleDateFormat("yyyy-MM-dd");
			String endDate = dateSf.format(now);
			return (new ModelAndView(this.listForAccountFormView)).addObject(
					"end_date", endDate);
		}
	}

	public ModelAndView handleListForAccount(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String contentType = request.getParameter("content_type");
		String clientId = request.getParameter("client_id");
		Establishment est = (Establishment) this.deliverBillDao.get(
				Establishment.class, Long.parseLong(clientId));
		List contactList = this.establishmentContactDao.getList(Long
				.parseLong(clientId));
		EstablishmentContact contact = null;
		if (contactList.size() > 0) {
			contact = (EstablishmentContact) contactList.get(0);
		}

		ModelAndView mv = new ModelAndView(this.listForAccountView);
		QueryParameterBean b = EncDeliverBillMACtrHelper
				.handleListForAccountList(request, this.dataSource);
		mv.addAllObjects(b.getParameters());
		QueryResult qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
				(String[]) null, b.getShortNameMap(), b.getRetObjs(),
				(String[]) null);
		List mtList = this.makeTypeDao.getList(false);
		BigDecimal costTotal = new BigDecimal(0);

		for (int map = 0; map < qr.getList().size(); ++map) {
			Object[] v = (Object[]) qr.getList().get(map);
			BusinessBillItem bi = (BusinessBillItem) v[0];
			BigDecimal thisAmount = (BigDecimal) v[4];
			new BigDecimal(0);
			BigDecimal amount = new BigDecimal(0);
			if (bi.getPriceType().equals("AMOUNT")) {
				amount = thisAmount;
			} else if (bi.getPriceType().equals("AREA")) {
				amount = thisAmount.multiply(bi.getSquareNum()).divide(
						bi.getAmount(), 4, 4);
			} else if (bi.getPriceType().equals("LENGTH")) {
				amount = thisAmount.multiply(bi.getSquareNum()).divide(
						bi.getAmount(), 4, 4);
			}

			BigDecimal itemCost = amount.multiply(bi.getUnitPrice()).setScale(
					2, 4);
			v[4] = amount;
			v[5] = itemCost;
			costTotal = costTotal.add(itemCost);
		}

		if (contentType != null && contentType.equals("EXCEL")) {
			HashMap arg18 = new HashMap();
			arg18.put("list", qr.getList());
			arg18.put("mtList", mtList);
			arg18.put("est", est);
			arg18.put("contact", contact);
			arg18.put("costTotal", costTotal);
			arg18.put("start_date", request.getParameter("start_date"));
			arg18.put("end_date", request.getParameter("end_date"));
			arg18.put("include_sub", request.getParameter("include_sub"));
			DeliverBillListForAccountExcelView arg19 = new DeliverBillListForAccountExcelView();
			return new ModelAndView(arg19, arg18);
		} else {
			mv.addObject("qr", qr);
			mv.addObject("mtList", mtList);
			mv.addObject("est", est);
			mv.addObject("contact", contact);
			mv.addObject("costTotal", costTotal);
			mv.addObject("codeRule", this.codeRuleDao.get("DELIVER_BILL"));
			return mv;
		}
	}

	public ModelAndView handleSetDeliCodeForm(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.setDeliCodeFormView);
		String billId = request.getParameter("bill_id");
		DeliverBill b = (DeliverBill) this.deliverBillDao.get(
				DeliverBill.class, Long.parseLong(billId));
		if (b != null) {
			mv.addObject("deliComp", b.getDeliComp());
			mv.addObject("deliCode", b.getDeliCode());
		}

		mv.addObject("billId", billId);
		return mv;
	}

	public ModelAndView handleSetDeliCode(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String deliComp = request.getParameter("deli_comp");
		String deliCode = request.getParameter("deli_code");
		String billId = request.getParameter("bill_id");
		String errMsg = "";
		ModelAndView mv;
		if (errMsg.equals("")) {
			this.deliverBillDao.setDeliCode(Long.parseLong(billId), deliComp,
					deliCode);
			mv = new ModelAndView("redirect:/ModalDialogSuccess.ihtm");
			mv.addObject("returnValue", "ok");
			EncCommonHelper.setAlertMessage(request, "保存成功");
		} else {
			mv = new ModelAndView(this.setDeliCodeFormView);
			mv.addObject("deliComp", deliComp);
			mv.addObject("deliCode", deliCode);
			mv.addObject("billId", billId);
			EncCommonHelper.setAlertMessage(request, errMsg);
		}

		return mv;
	}

	public ModelAndView handleItemSearchResult(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "DELI_ITEM_SEAR")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.itemSearchResultView);
			String contentType = request.getParameter("content_type");
			List mtList = this.makeTypeDao.getList(false);
			List pmList = this.payModeDao.getList(false);
			QueryParameterBean b = EncDeliverBillMACtrHelper
					.handleItemSearchResult(request, this.dataSource);
			QueryResult qr;
			if (contentType != null && contentType.equals("EXCEL")) {
				qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
						(String[]) null, b.getShortNameMap(), b.getRetObjs(),
						(String[]) null);
			} else {
				qr = this.queryDao.doQuery(b.getCurrentPage(), b.getPageSize(),
						b.getQParas(), b.getOParas(), (String[]) null,
						b.getShortNameMap(), b.getRetObjs(), (String[]) null);
			}

			for (int ub = 0; ub < qr.getList().size(); ++ub) {
				Object[] v = (Object[]) qr.getList().get(ub);
				BigDecimal thisAmount = (BigDecimal) v[9];
				BigDecimal biAmount = (BigDecimal) v[15];
				BigDecimal squareNum = (BigDecimal) v[16];
				String priceType = (String) v[17];
				BigDecimal amount = new BigDecimal(0);
				if (priceType.equals("AMOUNT")) {
					amount = thisAmount;
				} else if (priceType.equals("AREA")) {
					amount = thisAmount.multiply(squareNum).divide(biAmount, 4,
							4);
				} else if (priceType.equals("LENGTH")) {
					amount = thisAmount.multiply(squareNum).divide(biAmount, 4,
							4);
				}

				v[9] = amount;
			}

			if (contentType != null && contentType.equals("EXCEL")) {
				HashMap arg16 = new HashMap();
				arg16.put("list", qr.getList());
				arg16.put("mtList", mtList);
				arg16.put("pmList", pmList);
				DeliverBillItemListExcelView arg17 = new DeliverBillItemListExcelView();
				return new ModelAndView(arg17, arg16);
			} else {
				mv.addAllObjects(b.getParameters());
				mv.addObject("qr", qr);
				mv.addObject("mtList", mtList);
				mv.addObject("pmList", pmList);
				UserBean arg15 = EncCommonHelper.getCurrentUserAccount(request);
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, arg15));
				return mv;
			}
		}
	}

	public ModelAndView handleAppInfo(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			try {
				String mapper = request.getParameter("bill_code");
				DeliverBill json = this.deliverBillDao.get(mapper);
				if (json != null) {
					String out = "";
					String bbCode = "";
					List itemList = this.deliverBillItemDao
							.getListByDeliverBill(json.getId());
					Object bbItemList = new ArrayList();
					List mtList = this.makeTypeDao.getList(false);
					BusinessBill bb = (BusinessBill) this.deliverBillDao.get(
							BusinessBill.class, json.getBusinessBillId());
					if (bb != null) {
						bbCode = bb.getBillCode();
						Establishment arr = (Establishment) this.deliverBillDao
								.get(Establishment.class, bb.getClientId());
						if (arr != null) {
							out = arr.getEstName();
						}

						bbItemList = this.businessBillItemDao.getList(bb
								.getId());
					}

					map.put("billId", Long.valueOf(json.getId()));
					map.put("estName", out);
					map.put("bbCode", bbCode);
					map.put("billCode", json.getBillCode());
					map.put("lm", PageHelper.parseNull(json.getLinkman()));
					map.put("phon", PageHelper.parseNull(json.getPhone()));
					map.put("cont", PageHelper.parseNull(json.getContent()));
					map.put("addr", PageHelper.parseNull(json.getAddress()));
					map.put("deliComp",
							PageHelper.parseNull(json.getDeliComp()));
					map.put("deliCode",
							PageHelper.parseNull(json.getDeliCode()));
					map.put("mark", PageHelper.parseNull(json.getMark()));
					map.put("send", PageHelper.parseNull(json.getSended()));
					ArrayList arg23 = new ArrayList();

					for (int i = 0; i < itemList.size(); ++i) {
						DeliverBillItem dbItem = (DeliverBillItem) itemList
								.get(i);

						for (int j = 0; j < ((List) bbItemList).size(); ++j) {
							BusinessBillItem bbItem = (BusinessBillItem) ((List) bbItemList)
									.get(j);
							if (bbItem.getId() == dbItem.getBbItemId()) {
								HashMap item = new HashMap();
								item.put("mtName", EncCommonHelper
										.getSimpleObjectName(mtList,
												bbItem.getMakeTypeId()));
								item.put("cont", PageHelper.parseNull(bbItem
										.getFinishedContent()));
								item.put("prodName", PageHelper
										.parseNull(bbItem.getProName()));
								item.put("spec", PageHelper.parseNull(bbItem
										.getSpecification()));
								item.put("requ", PageHelper.parseNull(bbItem
										.getMakeRequire()));
								item.put("amouTota", EncCommonHelper
										.parseBigDecimal(bbItem.getAmount()));
								item.put("amou", EncCommonHelper
										.parseBigDecimal(dbItem.getAmount()));
								arg23.add(item);
								break;
							}
						}
					}

					map.put("items", arg23);
					map.put("status", "OK");
					map.put("errMsg", "");
				} else {
					map.put("status", "ERROR");
					map.put("errMsg", "系统不能识别这个条形码：" + mapper);
				}
			} catch (Exception arg19) {
				map.put("status", "ERROR");
				map.put("errMsg", arg19.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg20 = new ObjectMapper();
		String arg21 = arg20.writeValueAsString(map);
		ServletOutputStream arg22 = response.getOutputStream();
		arg22.write(arg21.getBytes("utf-8"));
		arg22.flush();
		arg22.close();
		return null;
	}

	public ModelAndView handleAppConf(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else if (!EncCommonHelper.checkPrivilege(request, "DELI_CONF")) {
			map.put("status", "ERROR");
			map.put("errMsg", "您还没有此功能的使用权限，请确认返回！");
		} else {
			String mapper = request.getParameter("id");
			json = request.getParameter("deli_comp");
			String out = request.getParameter("deli_code");
			String mark = request.getParameter("mark");

			try {
				this.deliverBillDao.setSended(Long.parseLong(mapper), json,
						out, mark, ub);
				SmsAlert e = this.smsAlertDao.get("DEL_CLIE");
				if (e != null && e.getStatus() != null
						&& e.getStatus().equals("Y")) {
					EnterpriseInfo ent = EncCommonHelper
							.getEnterpriseInfo(request);
					DeliverBill b = (DeliverBill) this.deliverBillDao.get(
							DeliverBill.class, Long.parseLong(mapper));
					BusinessBill bb = (BusinessBill) this.deliverBillDao.get(
							BusinessBill.class, b.getBusinessBillId());
					String content = "您订单号为" + bb.getBillCode() + "（"
							+ bb.getContent() + "）的订单已经出库，正在送货途中，敬请耐心等待，谢谢合作！"
							+ e.getCustomTxt();
					PageHelper.sendSms(b.getPhone(), b.getLinkman(), content,
							ent.getShortName(), this.deliverBillDao,
							this.idGenerator);
				}

				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg14) {
				map.put("status", "ERROR");
				map.put("errMsg", arg14.toString());
			}
		}

		ObjectMapper mapper1 = new ObjectMapper();
		json = mapper1.writeValueAsString(map);
		ServletOutputStream out1 = response.getOutputStream();
		out1.write(json.getBytes("utf-8"));
		out1.flush();
		out1.close();
		return null;
	}

	public ModelAndView handleAppNew(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else if (!EncCommonHelper.checkPrivilege(request, "DELI_NEW")) {
			map.put("status", "ERROR");
			map.put("errMsg", "您还没有此功能的使用权限，请确认返回！");
		} else {
			String mapper = request.getParameter("bb_code");
			EnterpriseInfo json = EncCommonHelper.getEnterpriseInfo(request);
			CodeRule out = this.codeRuleDao.get("DELIVER_BILL");

			try {
				String w = this.deliverBillService.txInsertApp(mapper,
						json.getDeliAutoComp(), ub, out, this.deliverBillDao,
						this.deliverBillItemDao, this.businessBillDao,
						this.businessBillItemDao, this.serialNumberDao,
						this.idGenerator);
				map.put("billCode", w);
				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (NotAllowException arg9) {
				map.put("status", "ERROR");
				map.put("errMsg", arg9.getMessage());
			} catch (CannotAcquireLockException arg10) {
				map.put("status", "ERROR");
				map.put("errMsg", "事务冲突故障，请重新操作！");
			}
		}

		ObjectMapper mapper1 = new ObjectMapper();
		String json1 = mapper1.writeValueAsString(map);
		ServletOutputStream out1 = response.getOutputStream();
		out1.write(json1.getBytes("utf-8"));
		out1.flush();
		out1.close();
		return null;
	}

	public DeliverBillDao getDeliverBillDao() {
		return this.deliverBillDao;
	}

	public void setDeliverBillDao(DeliverBillDao deliverBillDao) {
		this.deliverBillDao = deliverBillDao;
	}

	public DepartmentDao getDepartmentDao() {
		return this.departmentDao;
	}

	public void setDepartmentDao(DepartmentDao departmentDao) {
		this.departmentDao = departmentDao;
	}

	public QueryDao getQueryDao() {
		return this.queryDao;
	}

	public void setQueryDao(QueryDao queryDao) {
		this.queryDao = queryDao;
	}

	public String getSearchResultView() {
		return this.searchResultView;
	}

	public void setSearchResultView(String searchResultView) {
		this.searchResultView = searchResultView;
	}

	public DeliverBillItemDao getDeliverBillItemDao() {
		return this.deliverBillItemDao;
	}

	public void setDeliverBillItemDao(DeliverBillItemDao deliverBillItemDao) {
		this.deliverBillItemDao = deliverBillItemDao;
	}

	public String getDialogSuccessView() {
		return this.dialogSuccessView;
	}

	public void setDialogSuccessView(String dialogSuccessView) {
		this.dialogSuccessView = dialogSuccessView;
	}

	public String getInfoForExamineView() {
		return this.infoForExamineView;
	}

	public void setInfoForExamineView(String infoForExamineView) {
		this.infoForExamineView = infoForExamineView;
	}

	public String getInfoForUnExamineView() {
		return this.infoForUnExamineView;
	}

	public void setInfoForUnExamineView(String infoForUnExamineView) {
		this.infoForUnExamineView = infoForUnExamineView;
	}

	public String getListForExamineView() {
		return this.listForExamineView;
	}

	public void setListForExamineView(String listForExamineView) {
		this.listForExamineView = listForExamineView;
	}

	public String getListForUnExamineView() {
		return this.listForUnExamineView;
	}

	public void setListForUnExamineView(String listForUnExamineView) {
		this.listForUnExamineView = listForUnExamineView;
	}

	public String getItemListForBusinessBillView() {
		return this.itemListForBusinessBillView;
	}

	public void setItemListForBusinessBillView(
			String itemListForBusinessBillView) {
		this.itemListForBusinessBillView = itemListForBusinessBillView;
	}

	public String getPrintView() {
		return this.printView;
	}

	public void setPrintView(String printView) {
		this.printView = printView;
	}

	public String getDownloadView() {
		return this.downloadView;
	}

	public void setDownloadView(String downloadView) {
		this.downloadView = downloadView;
	}

	public String getInfoForCancelView() {
		return this.infoForCancelView;
	}

	public void setInfoForCancelView(String infoForCancelView) {
		this.infoForCancelView = infoForCancelView;
	}

	public String getListForCancelView() {
		return this.listForCancelView;
	}

	public void setListForCancelView(String listForCancelView) {
		this.listForCancelView = listForCancelView;
	}

	public DeliverBillService getDeliverBillService() {
		return this.deliverBillService;
	}

	public void setDeliverBillService(DeliverBillService deliverBillService) {
		this.deliverBillService = deliverBillService;
	}

	public DataSource getDataSource() {
		return this.dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public TallySetDao getTallySetDao() {
		return this.tallySetDao;
	}

	public void setTallySetDao(TallySetDao tallySetDao) {
		this.tallySetDao = tallySetDao;
	}

	public BusinessBillItemDao getBusinessBillItemDao() {
		return this.businessBillItemDao;
	}

	public void setBusinessBillItemDao(BusinessBillItemDao businessBillItemDao) {
		this.businessBillItemDao = businessBillItemDao;
	}

	public MakeTypeDao getMakeTypeDao() {
		return this.makeTypeDao;
	}

	public void setMakeTypeDao(MakeTypeDao makeTypeDao) {
		this.makeTypeDao = makeTypeDao;
	}

	public CodeRuleDao getCodeRuleDao() {
		return this.codeRuleDao;
	}

	public void setCodeRuleDao(CodeRuleDao codeRuleDao) {
		this.codeRuleDao = codeRuleDao;
	}

	public IdGenerator getIdGenerator() {
		return this.idGenerator;
	}

	public void setIdGenerator(IdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public SerialNumberDao getSerialNumberDao() {
		return this.serialNumberDao;
	}

	public void setSerialNumberDao(SerialNumberDao serialNumberDao) {
		this.serialNumberDao = serialNumberDao;
	}

	public String getPrintCostView() {
		return this.printCostView;
	}

	public void setPrintCostView(String printCostView) {
		this.printCostView = printCostView;
	}

	public UnitDao getUnitDao() {
		return this.unitDao;
	}

	public void setUnitDao(UnitDao unitDao) {
		this.unitDao = unitDao;
	}

	public String getPrintMultiCostView() {
		return this.printMultiCostView;
	}

	public void setPrintMultiCostView(String printMultiCostView) {
		this.printMultiCostView = printMultiCostView;
	}

	public String getPrintMultiView() {
		return this.printMultiView;
	}

	public void setPrintMultiView(String printMultiView) {
		this.printMultiView = printMultiView;
	}
}